<!doctype html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0">
  <title>EGW200</title>
  <link rel="stylesheet" href="css/style.css">
  <link rel="icon" href="./img/favicon.ico">
</head>

<body id="body-wrap">
  <div class="home-base">
    <div class="header-base flex flex-jcb">
        <!-- <img class="header-logo" src="./img/logoBlack.png"> -->
        <div class="header-menu" onclick="menuClick(this)">
        </div>
    </div>
    <div class="content-base flex">
      <div class="left-base" id="leftMenu">
<!--        <div class="left-title">系统菜单</div>-->
        <ul>
          <li>
            <a href="index.html" id="idLeftMenuHome" class="">系统状态</a>
          </li>
          <li>
              <a href="network.html" id="idLeftMenuNetwork" class="">网络设置</a>
          </li>
          <li>
              <a href="wlan.html" id="idLeftMenuWLAN" class="">Wi-Fi设置</a>
          </li>
  <!--                <li>-->
  <!--                    <a href="">流量统计</a>-->
  <!--                </li>-->
          <li>
            <a href="device.html" id="idLeftMenuDevice" class="">网关功能</a>
          </li>
          <li>
              <a href="ota.html" id="idLeftMenuOTA" class="">固件更新</a>
          </li>
        </ul>
      </div>
      <div class="right-base">
        <div class="page-header">
          <span class="header-title-one" onclick="">OTA</span>
        </div>
        <div class="page-content" id="otaShow">
          <div class="page-title">固件更新 OTA</div>
          <div class="page-detail">

            <div class="line-base">
              <p id="ota-title">
                  请选择新版本固件，然后点击升级按钮进行升级：
              </p>
              <p>
                建议通过有线方式连接, 升级过程大概需要1分钟。
              </p>
              <div class="file-input">
                  <input id="file-name" class="file-name" readonly type="text" />
                  <input type="file" onchange="fileChange(this)" id="file-info" class="file-info" name="file">
                  <span id="file-btn" class="file-btn">
                      浏览
                  </span>
              </div>                
            </div>

            <div class="line-base">
                <button id="start-upgrade" onclick="postOta()" class="">
                    升级
                </button>
                
                <button id="reboot" onclick="sendCmd('reboot')" class="">
                    重启
                </button>
            </div>

            <div class="line-base">
                <p>
                    <span id="cur-version" class="version-label">
                        当前APP固件版本:
                    </span>
                    <span id="version-wrap" class="version">
                        0
                    </span>
                </p>
            </div>

          </div>
        </div>

      </div>
    </div>
  </div>
  <script src="js/common.js"></script>
  <script src="js/ota.js"></script>
  <script>
    initHash();
    window.addEventListener('hashchange', function() {
      initHash();
    })
  </script>
</body>

</html>
